<ng-template let-context let-modal="modal" #saveAsCodeModal>
    <div class="header">{{ 'workflow_save_as_code_title' | translate }}</div>
    <div class="content">
        <ng-container *ngIf="!ope || ope.status < 2">
            <div class="ui active inverted dimmer">
                <div class="ui text active loader">{{ 'workflow_save_as_code_pending' | translate }}</div>
            </div>
        </ng-container>
        <ng-container *ngIf="ope && ope.status === 2">
            <div class="ui success message">
                {{ 'workflow_as_code_pr_success' | translate }}
                <a href="{{ope.setup.push.pr_link}}" target="_blank">{{ ope.setup.push.pr_link }}</a>
            </div>
        </ng-container>
        <ng-container *ngIf="ope && ope.status === 3">
            <div class="ui negative message">
                {{ ope.error }}
            </div>
        </ng-container>
    </div>
    <div class="actions">
        <button class="ui grey button" (click)="modal.approve(true)">{{ 'common_close' | translate }}</button>
    </div>
</ng-template>
